package com.example.demo.core.exception;

public enum StatusCode {
    USERNAME_EXISTS_ERROR(50001, "用户名已存在"),
    MethodArgumentNotValidException(100003, "Method Argument Not Valid Exception");

    private int code;
    private String desc;
    StatusCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return this.code;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return "ErrorCodeEnum{" + "code='" + code + '\'' + ", desc='" + desc + '\'' + '}';
    }
}
